package com.coocaa.ops.common.tool.http;

/**
 * @author tangminghong
 * @date 2020-06-10 17:31
 */
public enum HttpCodeEnums {

    /**
     * 错误码枚举
     */
    SUCCESS(0),
    OK(200),
    MULTI_STATUS(207),
    LOGIN_FAIL(303),
    BAD_REQUEST(400),
    UNAUTHORIZED(401),
    FORBIDDEN(403),
    NOT_FOUND(404),
    REQUEST_TIMEOUT(408),
    CONFLICT(409),
    GONE(410),
    LOCKED(423),
    INTERNAL_SERVER_ERROR(500);

    private final Integer value;

    HttpCodeEnums(Integer value) {
        this.value = value;
    }

    public Integer value() {
        return this.value;
    }

    public String msg() {
        return Resources.getMessage("HTTPCODE_" + this.value);
    }

    @Override
    public String toString() {
        return this.value.toString();
    }
}
